Data processing apparatus capable of communicating with output apparatus and its data processing method

ABSTRACT

A data processing apparatus communicating with a printer through a predetermined communication medium, in which a printer command forming unit constructs a print image by analyzing a drawing command formed by an operating system and forms a printer control command based on the print image; a first obtaining unit obtains feature information to presume print processing times by the printer command forming unit where a specific compression method is used and where it is not used; a discriminating unit discriminates whether the printer command forming unit should use the specific compression method or not based on the feature information obtained by the first obtaining unit; and a controller switches and controls whether to apply the specific compression method in forming the printer command based on a discrimination result of the discriminating unit.

This application is a division of application Ser. No. 09/208,976, filedDec. 11, 1998, now U.S. Pat. No. 6,535,292.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The invention relates to a data processing apparatus which cancommunicate with a printer through a predetermined communication medium,a data processing method of the data processing apparatus, and a memorymedium in which a computer readable program has been stored.

2. Related Background Art

Hitherto, in a printing system comprising a host computer and a printerconnected to the host computer, a conventional printer driver (printercontrol command forming program) which operates on the host computerforms a printer control command while always applying a predetermineddata compression method. In the case where a data compressing processcannot be performed due to some reasons or a compression effect cannotbe obtained, another compression method in place of it is applied or aprinter control command forming process which is not accompanied withthe data compressing process is executed.

In the printer driver according to the conventional technique, since aprocessing time that is required for various printing processes is notconsidered in a step of forming the printer control command whileapplying a specific compression method, there is a problem such that arelatively high-speed printing process cannot be performed.

SUMMARY OF THE INVENTION

The invention is made to solve the above problems and it is an object ofthe invention to provide a data processing apparatus in which featureinformation which makes it possible to presume various print processingtimes in the case where a specific compression method is applied and thecase where it is not applied is obtained, printer control commands aresequentially formed while a compression method whereby a relativelyhigh-speed process can be performed is dynamically determined on thebasis of the feature information, thereby enabling a relativelyhigh-speed printing process to be realized. It is also an object of theinvention to provide a data processing method for such a data processingapparatus and a memory medium in which a computer readable program hasbeen stored.

According to a first aspect of the present invention, there is provideda data processing apparatus which can communicate with a printer througha predetermined communication medium, comprising: printer commandforming means for constructing a print image by analyzing a drawingcommand which is formed by an operating system and for forming a printercontrol command which is based on the print image and should betransferred to the printer; first obtaining means for obtaining featureinformation to presume print processing times by the printer commandforming means in the case where a specific compression method is usedand the case where it is not used; discriminating means fordiscriminating whether the printer command forming means should use thespecific compression method or not on the basis of the featureinformation obtained by the first obtaining means; and control means forswitching and controlling the formation of the printer control commandwhich is formed by the printer command forming means and to which thespecific compression method is applied and the formation of the printercontrol command to which the specific compression method is not appliedon the basis of a discrimination result of the discriminating means.

According to a second aspect of the invention, the discriminating meanscompares the processing times which are computed from the featureinformation obtained by the first obtaining means and from apredetermined parameter, thereby discriminating whether the printercommand forming means can apply the use of the specific compressionmethod or not.

According to a third aspect of the invention, the discriminating meansdiscriminates whether the specific compression method should be usedafter the print image was constructed or not.

According to a fourth aspect of the invention, the first obtaining meansobtains the feature information to presume the print processing timefrom a predetermined memory medium.

According to a fifth aspect of the invention, the predetermined memorymedium is a memory medium which is detachable to/from a main body of thedata processing apparatus.

According to a sixth aspect of the invention, the first obtaining meansobtains the feature information to presume the print processing timefrom a value that is inputted on a predetermined print setting pictureplane depending on a print control module.

According to a seventh aspect of the invention, the first obtainingmeans obtains the feature information to presume the print processingtime by a predetermined program module.

According to an eighth aspect of the invention, the first obtainingmeans obtains the feature information to presume the print processingtime from a memory resource of the printer through the communicationmedium.

According to a ninth aspect of the invention, the first obtaining meansobtains the feature information to presume the print processing timefrom a memory resource which is detachable to/from the printer throughthe communication medium.

According to a tenth aspect of the invention, the data processingapparatus further has: second obtaining means for obtaining printresource information from the printer through the communication medium;and changing means for changing the feature information to presume theprint processing time obtained by the first obtaining means on the basisof the print resource information obtained by the second obtainingmeans.

According to an eleventh aspect of the present invention, there isprovided a data processing method of a data processing apparatus whichcan communicate with a printer through a predetermined communicationmedium, comprising: a printer command forming step of constructing aprint image by analyzing a drawing command which is formed by anoperating system and forming a printer control command which is based onthe print image and should be transferred to the printer; an obtainingstep of obtaining feature information to presume print processing timesby the printer command forming step in the case where a specificcompression method is used and the case where it is not used; adiscriminating step of discriminating whether the specific compressionmethod should be used in the printer command forming step or not on thebasis of the feature information obtained by the obtaining step; and adeciding step of deciding the formation of the printer control commandwhich is formed by the printer command forming step and to which thespecific compression method is applied and the formation of the printercontrol command to which the specific compression method is not appliedon the basis of a discrimination result of the discriminating step.

According to a twelfth aspect of the present invention, there isprovided a memory medium in which a computer readable program forcontrolling a data processing apparatus which can communicate with aprinter through a predetermined communication medium has been stored,wherein said program comprises: a printer command forming step ofconstructing a print image by analyzing a drawing command which isformed by an operating system and forming a printer control commandwhich is based on the print image and should be transferred to theprinter; an obtaining step of obtaining feature information to presumeprint processing times by the printer command forming step in the casewhere a specific compression method is used and the case where it is notused; a discriminating step of discriminating whether the specificcompression method should be used in the printer command forming step ornot on the basis of the feature information obtained by the obtainingstep; and a deciding step of deciding the formation of the printercontrol command which is formed by the printer command forming step andto which the specific compression method is applied and the formation ofthe printer control command to which the specific compression method isnot applied on the basis of a discrimination result of thediscriminating step.

According to the invention, there are provided data processing methodand apparatus, in which a CPU 1 obtains the feature information topresume various print processing times in the case where the specificcompression method is applied and the case where it is not applied isobtained from any one of an RAM 2, an external memory 11, an externalmemory 14, and an ROM 13, and the printer control commands aresequentially formed while the compression method by which a relativelyhigh-speed process can be performed is dynamically determined on thebasis of the feature information.

According to the data processing method of the invention, the methodcomprises: a printer command forming step of constructing a print imageby analyzing a drawing command which is formed by an operating systemand forming a printer control command which is based on the print imageand should be transferred to the printer; an obtaining step of obtainingfeature information to presume print processing times by the printercommand forming step in the case where a specific compression method isused and the case where it is not used; a discriminating step ofdiscriminating whether the specific compression method should be used inthe printer command forming step or not on the basis of the featureinformation obtained by the first obtaining step; and a deciding step ofdeciding the formation of the printer control command which is formed bythe printer command forming step and to which the specific compressionmethod is applied and the formation of the printer control command towhich the specific compression method is not applied on the basis of adiscrimination result of the discriminating step. Therefore, whether thecompression method is applied to a print data amount which fluctuates ornot can be dynamically determined in consideration of the featureinformation to presume the print processing time by the printer commandforming step. For print data such that the presumed processing time isbelow the effect that will be obtained by the compression, the printercontrol command which is based on the print image and should betransferred to the printer is formed without actively compressing, and aseries of printing processes can be remarkably reduced.

Therefore, the feature information for making it possible to presume thevarious print processing times in the case where the specificcompression method is applied and the case where it is not applied isobtained and the printer control commands can be sequentially formedwhile the compression method by which the relatively high-speed processcan be performed is dynamically determined on the basis of the featureinformation. There are effects such that the relatively high-speedprinting process can be realized and the like.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram for explaining a construction of a printingsystem to which a print control apparatus showing the first embodimentof the invention can be applied;

FIG. 2 is a diagram showing a format of a printer control command whichis analyzed by a CPU shown in FIG. 1;

FIG. 3 is a diagram showing an example of a memory map in an RAM shownin FIG. 1;

FIG. 4 is a flowchart showing an example of a first data processingprocedure in the print control apparatus according to the invention;

FIG. 5 is a flowchart showing an example of a second data processingprocedure in the print control apparatus according to the invention;

FIG. 6 is a flowchart showing an example of a third data processingprocedure in the print control apparatus according to the invention;

FIG. 7 is a diagram showing an example of a feature information resourcetable which is assured in the RAM shown in FIG. 1;

FIG. 8 is a flowchart showing an example of a fourth data processingprocedure in the print control apparatus according to the invention; and

FIG. 9 is a diagram for explaining a memory map of a memory medium tostore various data processing programs which can be read out by theprinting system to which the print control apparatus according to theinvention can be applied.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[First Embodiment]

FIG. 1 is a block diagram for explaining a construction of a printingsystem to which a data processing apparatus showing the first embodimentof the invention can be applied. It will be obviously understood thatthe invention can be applied to any one of a single equipment, a systemcomprising a plurality of equipment, and a system which is connectedthrough a network such as LAN, WAN, or the like and in which processesare executed so long as the functions of the invention are executed.

In the diagram, reference numeral 3000 denotes a host computer having aCPU 1 for executing a document process of a document in which figures,images, characters, tables (including a spreadsheet or the like), andthe like mixedly exist on the basis of a document processing program orthe like stored in a program ROM of an ROM 3. The CPU 1 collectivelycontrols devices which are connected to a system bus 4.

An operating system program (hereinafter, abbreviated to an OS) servingas a control program or the like of the CPU 1 is stored in the programROM of the ROM 3 or in an external memory 11. Font data or the likewhich is used at the time of the document process is stored in a fontROM of the ROM 3 or the external memory 11. Various data (for example,directory information, printer driver table, and the like) which is usedwhen performing the document process and the like is stored in a dataROM of the ROM 3 or the external memory 11. In this case, on hardware, amain part of the control is performed by the CPU.

On the other hand, on software, a main part of the control is performedby application software called a printer control command forming program(hereinafter, referred to as a printer driver). In the embodiment, forexample, although “Windows 95” (trade name) is presumed as an OS, theinvention is not limited to it.

Reference numeral 2 denotes an RAM which functions as a main memory, awork area, or the like of the CPU 1. Reference numeral 5 denotes akeyboard controller (KBC) for controlling a key input from a keyboard(KB) 9 or a pointing device (not shown). Reference numeral 6 denotes aCRT controller (CRTC) for controlling the display of a CRT display (CRT)10. Reference numeral 7 denotes a disk controller (DKC) for controllingan access to the external memory 11 such as hard disk (HD), floppy disk(FD), or the like for storing a boot program, various applications, fontdata, a user file, an editing file, a printer driver, and the like.

Reference numeral 8 denotes a printer controller (PRTC) which isconnected to a printer 1500 through a predetermined bidirectionalinterface (interface) 210 and executes a communication control processwith the printer 1500. The CPU 1 executes, for example, a developing(rasterizing) process of an outline font into a display information RAMset on the RAM 2, thereby enabling WYSIWYG on the CRT 10. The CPU 1opens various registered windows and executes various data processes onthe basis of commands instructed by a mouse cursor or the like (notshown) on the CRT 10.

In the printer 1500, reference numeral 12 denotes a printer CPU (CPU)for generating an image signal as output information to a printingsection (printer engine) 17 connected to a system bus 15 on the basis ofa control program or the like stored in a program ROM of an ROM 13 or acontrol program or the like stored in an external memory 14.

A control program or the like which can interpret a specific pagedescribing language is stored in the program ROM of the ROM 13.Particularly, a printer control command (hereinafter, referred to as araster image drawing command) having a drawing function of a rasterimage can be also processed. A format of the printer control command isconstructed by a command header section 21, a parameter section 22, andan image data section 23 as shown in FIG. 2. A specific data compressionmethod (hereinafter, referred to as a compression method A) can be alsoapplied to the image data section 23.

Even if the same printer control command to which the compression methodA is applied and the same printer control command to which thecompression method A is not applied mixedly exist, the foregoing controlcommand can be sequentially processed.

Further, font data which is used when the output information is formedis stored in a font ROM of the ROM 13 and, in case of a printer suchthat the external memory 14 such as a hard disk or the like does notexist, information or the like which is used on the host computer 3000is stored in a data ROM of the ROM 13. The CPU 12 can communicate withthe host computer 3000 through an input unit 18 and can notify the hostcomputer 3000 of the information or the like in the printer 1500.

Reference numeral 19 denotes an RAM which functions as a main memory, awork area, or the like of the CPU 12. A memory size of the RAM 19 can beexpanded by an option RAM which is connected to an expansion port (notshown).

The RAM 19 is used as an output information developing area, anenvironmental data storing area, an NVRAM, or the like. An access to theforegoing external memory 14 such as hard disk (HD), IC card, or thelike is controlled by a disk controller (DKC) 20. The external memory 14is connected as an option and stores font data, an emulation program,form data, and the like.

Reference numeral 500 denotes an operation panel (operation unit) onwhich switches for operation, an LED display, and the like are arranged.

Further, the foregoing external memory 14 is not limited to one memorybut can be also constructed in a manner such that at least one or morememories are provided and a plurality of external memories in which anoption font card besides built-in fonts and a program to interpretprinter control languages of different language systems have been storedcan be connected. Moreover, it is also possible to have an NVRAM (notshown) and to store printer mode setting information from the operationpanel 500.

In the host computer 3000, the BIOS, OS, application, and a printerdriver to which an information processing method according to theinvention is applied are made operative by the CPU 1. The BIOS has beenwritten in the program ROM of the ROM 3. The OS has been written in thehard disk (hereinafter, abbreviated to an HD) serving as an externalmemory 11. When a power source of the host computer 3000 is turned on,the OS is read out from the external memory 11 and is stored into theRAM 2 by an IPL (Initial Program Loading) function in the BIOS programand the operation of the OS is started.

The operation of the printer driver is actually enabled in the casewhere the application which operates under the OS management on the hostcomputer 3000 starts the printing process by an instruction of the useror the like and in the case where the printer driver is read out fromthe medium such as an external memory 11 or the like in which theprinter driver has been recorded and is loaded into the RAM 2 under thecontrol of the OS and BIOS.

FIG. 2 is a diagram showing a format of a printer control command whichis analyzed by the CPU 12 shown in FIG. 1. In the embodiment, it isconstructed by the command header 21, parameter section 22 showingvarious parameters such as command size, image size, and the like, imagedata section 23, and the like.

FIG. 3 is a diagram showing an example of a memory map in the RAM 2shown in FIG. 1 and corresponds to a memory map in a state where theprinter driver has been loaded into the RAM 2 on the host computer 3000and can be executed.

In the diagram, reference numeral 31 denotes the RAM 2 shown in FIG. 1;32 a memory area which is used by the application; 33 a free memoryblock; 34 a memory area in which associated data is stored; 35 a memoryarea which is used by the printer driver; 36 an area which is used bythe OS; and 37 a memory area which is used by the BIOS.

In the embodiment, FIG. 4 is a flowchart showing a main flow when theraster system printer driver to which the invention can be applied formsa printer control command.

FIG. 4 is a flowchart showing an example of a first data processingprocedure in the data processing apparatus according to the invention.Reference numerals (1) to (9) denote processing steps.

First, the printer driver receives a print request from the application(1). Subsequently, a check is made to see if the print request denotesthe start of printing (2). If it is decided that it means the start ofthe printing, a memory area (hereinafter, referred to as a band memory)to store the rasterized print image is assured on the RAM 2 of the hostcomputer 3000 and the initialization is performed in step (3). Theprinter driver again receives the print request from the application.

When it is determined in step (2) that the print request received fromthe application does not mean the start of the printing, a check issubsequently made to see if the print request denotes the end ofprinting in step (4). When it is determined that it does not indicatethe end of the printing, in step (5), only when there is a drawingrequest, the print image according to the requested contents isconstructed (rasterized) and stored into the band memory.

In step (6), a check is made to see if the print request from theapplication for the band area which is being processed has beenfinished. If NO, the processing routine is returned to step (1) andsimilar processes are repeated.

When it is decided in step (6) that the print request from theapplication has been finished, namely, when it is determined that theprint request for the band area that is being processed has beenfinished, step (7) follows. The band area is divided into segments of aproper size and a printer control command corresponding to each of thesegment areas is formed while dynamically applying the data compressionas necessary.

In step (8), the band memory is subsequently initialized and theprocessing routine is returned to step (1) in order to again receive aprint request corresponding to a new band area from the application.

When it is decided in step (4) that the print request received from theapplication indicates the end of the printing, step (9) follows and theband memory is released from the RAM 2. The processes are finished.

In the embodiment, the printing process in a range from the time pointwhen the application which operates on the host computer 3000 starts theprinting process to the time point when all of the output papers areejected from the printer 1500 is largely classified into the followingsix phases. The processing time that is required by each printingprocess excluding phases 1, 2, and 6 largely depends on the compressionmethod which is applied to the printer control command or its data size.

The first phase is a phase to form the print image on the host computer.The second phase is a phase to form the printer control command. Thethird phase is a phase of a spool (Write) and a phase of a despool(Read) of the printer control command. The fourth phase is a phase totransmit the printer control command. The fifth phase is a phase fordeveloping the printer control command in the printer. The sixth phaseis a phase to form the print image on the printer and convey the paper.

A flow of the first to sixth phase processes will now be describedhereinbelow.

When the application which operates on the host computer 3000 starts theprinting process by an instruction of the user or the like, theapplication generates various drawing commands to the printer driverthrough the OS in order to print and output the print image.

The printer driver stores the formed print image into the RAM 2 of thehost computer 3000 in response to a series of various drawing commandswhile constructing the print image (the first phase). Subsequently tothe first phase, the printer driver divides the print image stored inthe RAM 2 into segments as necessary and forms a printer control commandcorresponding to each of the divided segments. When the printer controlcommand is formed, the data is dynamically compressed as necessary (thesecond phase).

The printer control commands formed in the second phase are sequentiallystored into the external memory 11 or the like as a temporary file whichis managed by the OS and, after the series of printer control commandforming processes was finished and all of the printer control commandswere similarly stored, the printer control commands are read out fromthe temporary file under the OS management (the third phase).

The data read out by the third phase is transmitted to the printer 1500under the OS control through connecting means which has previously beendefined by the OS (the fourth phase).

When the printer control commands are received, the printer 1500sequentially interprets them while collating with the specifications ofthe page describing languages which are supported by the control programstored in the ROM 13 or the like of the printer 1500 (the fifth phase).

Now, considering a page printer as an example, the print images formedby developing the printer control commands are successively stored intothe RAM 19 of the printer 1500, the print image data is sequentiallytransmitted to the printing section (printer engine) 17 at a timing whenthe formation and the storage of the print image corresponding to thewhole page are finished, the print image is printed onto an output paperby the printer engine 17, and after that, the printed paper is ejectedfrom a printer paper ejecting section (the sixth phase).

The foregoing phases are not always time sequentially processed inaccordance with a predetermined order. Most of the phases are usuallyprocessed in parallel.

It will be obviously understood that when the printer driver forms theprinter control commands (the second phase), even if any compressionmethod is applied, the first and sixth phases are not influenced.However, the reason why the second phase is not influenced is becausethe compressing process itself is executed before the final datacompression method which is applied to the printer control commands isdetermined as a prerequisite.

That is, it is presumed that the data compressing process is alwaysperformed irrespective of, for example, a discrimination result aboutwhether the compression method A is applied to the printer controlcommands or not.

In the third phase, almost of the processing time is expended forRead-Write to the temporary file which is formed on the external memory11 of the host computer 3000. In the fourth phase, almost of theprocessing time is expended for the data communication between the hostcomputer 3000 and printer 1500. Consequently, the processing times ofthose phases are obviously largely influenced by the data size of theprinter control command.

In the embodiment, it is also presumed that the processing time that isrequired for the fifth phase also largely depends on the data size forevery compression method applied to the printer control commands from aviewpoint of the hardware or software specifications of the printer1500.

In the embodiment, specifically, it is assumed that the processing timeswhich are required for the third and fourth phases can be almostcalculated by the following calculating equations and that theprocessing time which is required for the fifth phase can be almostcalculated by the following calculating equations (1) to (5)divisionally in the case where the compression method A is applied andthe case where it is not applied.

All of α, β, γ1, and β2 (which can become a part or all of the featureinformation which can presume various print processing times when aspecific compression method is applied to the printer control commands)in the following equations denote constant values. It is assumed that γ1denotes the constant value in the case where the compression method A isapplied and γ2 denotes a constant value in the case where the datacompression is not applied. “Size” indicates a data size of the printercontrol command.The processing time (msec) at the thirdphase=α(msec/byte)*Size(byte)  (1)The processing time (msec) at the fourthphase=β(msec/byte)*Size(byte)  (2)The processing time (msec) at the fifthphase=γ1(msec/byte)*Size(byte)=γ2(msec/byte)*Size (byte)  (3)

Therefore, the processing times which are required for the third tofifth phases can be shown as follows divisionally in the case where thecompression method A is applied to the printer control commands whichare formed and the case where it is not applied. “Size1” denotes a datasize in the case where the compression method A is applied and “Size2”denotes a data size in the case where the compression method A is notapplied.The processing time (msec) when the compression method A isapplied=(α+β+γ1)(msec/byte)*Size1[byte]  (4)The processing time (msec) when the compression is notperformed=(α+β+γ2)(msec/byte)*Size2[byte]  (5)

Thus, in order to execute each of the series of printing processes shownby the third to fifth phases at a higher speed, it will be understoodthat it is necessary to apply the compression method A when the datasize (Size1) in the case where the compression method A is applied issmaller than a value TT shown in the following equation (6) and not toapply the data compression in the other cases.

 TT=((α+β+γ2)/(α+β+γ1))*Size2  (6)

A characteristic construction of the embodiment will now be describedhereinbelow with reference to FIG. 1.

The embodiment relates to a data processing apparatus (host computer3000) which is constructed as mentioned above and can communicate with aprinter (printer 1500) through a predetermined communication medium,comprising: printer command forming means for constructing a print imageby analyzing a drawing command which is formed by the operating systemand forming a printer control command which is based on the print imageand should be transferred to the printer (the CPU 1 executes a programwhich is stored in the ROM 3 or external memory 11 and forms andcontrols); obtaining means for obtaining feature information to presumeprint processing times by the printer command forming means in the casewhere a specific compression method is used and the case where it is notused (the CPU 1 obtains the feature information by executing a programwhich is stored in the ROM 3 or external memory 11); discriminatingmeans for discriminating whether the printer command forming meansshould use the specific compression method or not on the basis of thefeature information obtained by the obtaining means (the CPU 1 executesthe program which is stored in the ROM 3 or external memory 11 and formsand controls); and control means for switching and controlling theformation of the printer control command to which the specificcompression method is applied by the printer command forming means andthe formation of the printer control command to which the specificcompression method is not applied on the basis of a discriminationresult of the discriminating means (the CPU 1 executes the program whichis stored into the ROM 3 or external memory 11 and switches andcontrols). Therefore, whether the compression method is applied to theprint data amount which fluctuates or not can be dynamically determinedin consideration of the feature information to presume the printprocessing time by the printer command forming means. For the print datasuch that the processing time that is predicted is below the effectwhich is obtained by the compression, the printer control command whichis based on the print image and should be transferred to the printer isformed without actively compressing, and a series of printing processescan be remarkably reduced.

The discriminating means compares the processing times which arecomputed from the feature information obtained by the first obtainingmeans and from a predetermined parameter, thereby discriminating whetherthe printer command forming means can apply the use of the specificcompression method or not. Therefore, the print processing times in thecase where the compression method is applied and the case where it isnot applied are computed and relatively compared and verified, so thatwhether the use of the specific compression method can be applied or notcan be certainly determined.

Further, the discriminating means discriminates whether the specificcompression method should be used after the print image was constructedor not. Therefore, the time that is required from a time point afterwhether the compression method is applied or not was determined to atime point when the printer control command is formed and transferredcan be remarkably reduced.

The first obtaining means obtains the feature information to presume theprint processing time from a predetermined memory medium. Therefore, thefeature information that is peculiar to the specific compression methodcan be certainly obtained.

Further, the predetermined memory medium is a memory medium (FD as anexternal memory 11) which is detachable to/from a main body of the dataprocessing apparatus. Therefore, even when the printer is changed or aplurality of printers can be selected, the feature information that ispeculiar to the corresponding specific compression method can becertainly obtained.

The first obtaining means obtains the feature information to presume theprint processing time from a value that is inputted on a predeterminedprint setting picture plane depending on a print control module.Therefore, the feature information can be also usually set through agraphical user interface such as a printer driver setting picture planeor the like by the user.

Further, the obtaining means obtains the feature information to presumethe print processing time by a predetermined program module. Therefore,an environment to perform the obtaining process of the featureinformation can be prepared independently of the printer control.

The first obtaining means obtains the feature information to presume theprint processing time from a memory resource (ROM 13, external memory14, or RAM 19) of the printer (printer 1500) through the communicationmedium. Therefore, the feature information that is peculiar to thespecific compression method can be obtained from the printer and aburden on the memory can be reduced.

Further, the first obtaining means obtains the feature information topresume the print processing time from a memory resource (FD as anexternal memory 14) which is detachable to/from the printer through thecommunication medium. Therefore, the feature information that ispeculiar to the specific compression method can be obtained from thememory resource that is supplied to the printer and a burden on thememory can be reduced.

Further, the data processing apparatus further has: second obtainingmeans for obtaining print resource information (memory size or the like)from the printer through the communication medium (the CPU 1 obtains itby executing the program which is stored into the ROM 3 or externalmemory 11); and changing means for changing the feature information topresume the print processing time obtained by the first obtaining meanson the basis of the print resource information obtained by the secondobtaining means. Therefore, in the case where the resource environmenton the printer side fluctuates and the print processing time fluctuates,the feature information that is peculiar to the specific compressionmethod can be changed also in consideration of such a fluctuation.Whether the compression method should be applied or not can be alsodetermined flexibly in correspondence to the fluctuation of the resourceinformation on the printer side.

Processes of the printer driver to which the data processing method ofthe data processing apparatus according to the invention is applied willnow be described in detail hereinbelow.

FIG. 5 is a flowchart showing an example of a second data processingprocedure in the data processing apparatus according to the invention.Reference numerals (1) to (11) denote processing steps.

First, the printer driver receives a print request from the application(1). Subsequently, a check is made to see if the print request denotesthe start of printing (2). If it is decided that it means the start ofthe printing, a memory area (hereinafter, referred to as a band memory)to store the rasterized print image is assured on the RAM 2 of the hostcomputer 3000 and the initialization is performed in step (3). Theprinter driver again receives the print request from the application.

In step (4), the constants α, β, γ1, and γ2 which enable the variousprint processing times in the case where the compression method A isapplied and the case where it is not applied to be presumed are read outfrom the printer driver constructing file stored in the external memory11 of the host computer 3000 (read out from the printer driverconstructing file stored in the RAM 2) and are stored into the RAM 2,respectively.

In step (5), the printer driver calculates a ratio ((α+β+γ2)/(α+β+γ1))shown in the equation (6) and stores into the RAM 2. The processingroutine is returned to step (1).

In the embodiment, although it is assumed that the various constants (α,β, γ1, and γ2) have been prepared and statistically stored in theexternal memory 11, the invention is not limited to this case. Forexample, a part or all of the constants can be stored in the externalmemory 14 (for instance, FD) which is detachable to/from the hostcomputer 3000 and can be also dynamically stored through a userinterface or the like of the printer driver. Further, they can bestatistically or dynamically stored into the memory means of the printer1500 and the printer driver can also get them through a bidirectionalinterface or a network. Various constants can be also obtained bydifferent means, respectively.

When it is determined in step (2) that the print request received fromthe application does not indicate the start of the printing, a check issubsequently made to see if it denotes the end of printing (6). When itis decided that the print request does not indicate the end of theprinting, only when it is the drawing request, the print image accordingto the requested contents is constructed (rasterized) and stored intothe band memory which is assured on the RAM 19 (7).

In step (8), a check is made to see if the print request from theapplication for the band area which is being processed has beenfinished. If NO, the processing routine is returned to step (1) andsimilar processes are repeated.

When it is determined in step (8) that the print request from theapplication has been finished, namely, when it is decided that the printrequest for the band area which is being processed has been finished,the processing routine advances to step (9). The band area is dividedinto segments of a proper size. The printer control commandcorresponding to each of the divided segments is formed whiledynamically applying the data compression as necessary. The decision ofthe compression method and the spool processing routine will bedescribed hereinlater with reference to FIG. 6.

In step (10), the band memory is initialized. The processing routine isreturned to step (1) in order to start to again receive the printrequest corresponding to a new band area from the application.

When it is determined in step (6) that the print request received fromthe application denotes the end of the printing, step (11) follows andthe band memory is released from the RAM 2. The processes are finished.

FIG. 6 is a flowchart showing an example of a third data processingprocedure in the data processing apparatus according to the inventionand corresponds to a detailed procedure of the decision of thecompression method and spool processing routine in step (9) shown inFIG. 5. Reference numerals (1) to (6) denote processing steps.

As already mentioned, when it is determined in step (8) shown in FIG. 5that the print request from the application to the band area which isbeing processed has been finished, the printer driver sequentially formsthe printer control commands corresponding to the print imagecorresponding to the band area.

First, the printer driver divides the band area into segments of aproper size (1). The image data corresponding to each of the dividedsegments is read out from the RAM 2 in accordance with a specific order(2). The compression method A is applied to the read-out data and thecompression data is stored into the RAM 2 (3).

The printer driver discriminates whether the image data corresponding tothe divided segment which is being processed has been compressed by thecompression method A at a ratio over the ratio ((α+β+γ2)/(α+β+γ1))stored in step (5) or not, thereby deciding whether the compressionmethod A is applied to the printer control command to be formed or not(4).

That is, now assuming that the image data size in the non-compressionstate is equal to Size2, if the data size Size1 after completion of thecompression is smaller than the calculation result shown in the equation(6), the compression method A is applied to the printer control command.On the contrary, when it is larger, the data compression is not appliedto the printer control command.

Subsequently, the printer driver forms the printer control command onthe basis of the compression method decided in step (4) and outputs itto a system spooler which is managed by the OS (5). A check is now madeto see if all of the processes for the divided segments have beenfinished (6). If NO, the processing routine is returned to step (2). IfYES, the processing routine advances to step (10) and subsequent stepsshown in FIG. 5.

According to the embodiment, the printer driver to which the processingprocedure is applied obtains the feature which enables the various printprocessing times in the case where the compression method is applied andthe case where it is not applied to be presumed and can sequentiallyform the printer control commands while the compression method by whichthe relatively high-speed process can be performed is dynamicallydetermined on the basis of the feature. Thus, there is an effect suchthat the relatively high-speed printing process can be realized.

In the embodiment, the invention has been applied by paying attentionto, particularly, the printer control command corresponding to thefunction to draw a raster image. However, the invention can be alsosimilarly applied to the other printer control commands so long as theysupport the compression and non-compression.

Further, in the case where the printer supports a plurality ofcompression methods for the printer control command corresponding to theraster image drawing function, the printer control command can be alsoformed while dynamically switching a plurality of compression methods.

The functions shown in the embodiment can be also executed by the hostcomputer on the basis of a program which is installed from the outside.In such a case, the invention is also applied to a case where by loadingan information group including a program into an output apparatus or asystem including the host computer from a memory medium such as CD-ROM,flash memory, FD, or the like or from an external memory medium througha network such as electronic mail, personal computer communication, orthe like, such a function is supplied to the host computer or outputapparatus.

[Second Embodiment]

The above first embodiment has been described with respect to the caseof determining whether the compression method A is performed or not bythe equation (6) on the assumption that the memory size of the RAM 19 onthe printer 1500 side is constant as a prerequisite. However, it is alsopossible to construct in a manner such that the printer driver which hasbeen loaded into the RAM 2 of the host computer 3000 and is operatingthereon obtains the hardware environment of the printer 1500 through thebidirectional interface, network, or the like and changes the featureinformation to enable the specific print processing time to be presumedin accordance with the environment. Such an embodiment will now bedescribed hereinbelow.

In the embodiment, it is assumed that the constant values (γ1, γ2) asfeature information which enables the processing time that is requiredfor phase 5 (development of the printer control command in the printer)shown in the first embodiment to be presumed change depending on a sizeof RAM 19 provided for the printer 1500 and their details are as shownin FIG. 7.

FIG. 7 is a diagram showing an example of a feature information resourcetable which is assured in the RAM 2 shown in FIG. 1. For instance, thistable is obtained from the printer 1500 by communication and is formed.

In the diagram, γ1 and γ2 denote the constant values which changerespectively in dependence on the size of RAM 19 provided for theprinter 1500. As the size of RAM 19 increases (including the case wherethe memory is expanded), its value decreases, so that the processingtime eventually becomes short.

Data processes regarding the data processing apparatus according to theinvention will be further described hereinbelow with reference to aflowchart shown in FIG. 8.

FIG. 8 is a flowchart showing an example of a fourth data processingprocedure in the data processing apparatus according to the invention.Reference numerals (1) to (12) denote processing steps.

First, the printer driver receives a print request from the application(1). Subsequently, a check is made to see if the print request denotesthe start of printing (2). If it is decided that it means the start ofthe printing, a memory area (hereinafter, referred to as a band memory)to store the rasterized print image is assured on the RAM 2 of the hostcomputer 3000 and the initialization is performed in step (3). Theprinter driver again receives the print request from the application.When the print request indicative of the start of printing is received,the printer driver obtains the size of RAM 19 provided for the printer1500 through the bidirectional interface 21 in step (4). In step (5),the printer driver reads out the constants γ1 and γ2 which enable theprocessing time that is required for phase 5 to be presumed and readsout the constants α and β which enable the processing times at the thirdand fourth phases to be presumed from the external memory 11 of the hostcomputer 3000 on the basis of the size obtained in step (4) and storesthem into the RAM 2 (6), respectively.

In step (6), the printer driver calculates the ratio ((α+β+γ2)/(α+β+γ1))shown in the equation (6) and stores into the RAM 2. The processingroutine is returned to step (1).

When it is determined in step (2) that the print request received fromthe application does not indicate the start of the printing, a check issubsequently made to see if it denotes the end of printing (7). When itis decided that the print request does not indicate the end of theprinting, only when it is the drawing request, the print imagecorresponding to the requested contents is constructed (rasterized) andstored into the band memory which is assured in the RAM 19 (8).

In step (9), a check is made to see if the print request from theapplication for the band area which is being processed has beenfinished. If NO, the processing routine is returned to step (1) andsimilar processes are repeated.

When it is determined in step (9) that the print request from theapplication has been finished, namely, when it is determined that theprint request for the band area which is being processed has beenfinished, step (10) follows. The band area is divided into segments of aproper size and the printer control command corresponding to each of thedivided segments is formed while dynamically applying the datacompression as necessary. The process in step (10) is as mentioned abovein conjunction with FIG. 6. The return destination of FIG. 6 in thiscase is step (11) shown in FIG. 8.

In step (11), subsequently, the band memory is initialized. Theprocessing routine is returned to step (1) in order to start to againreceive the print request corresponding to a new band area from theapplication.

When it is determined in step (7) that the print request received fromthe application denotes the end of the printing, step (12) follows andthe band memory is released from the RAM 2. The processes are finished.

According to the embodiment, even when the development processing timeof the printer control command in the printer is the time which changesdue to the size of RAM provided for the printer, the feature informationwhich enables the various print processing times in the case where thecompression method is applied and the case where it is not applied to bepresumed is obtained on the basis of the size of RAM. The printercontrol commands can be sequentially formed while the compression methodby which the relatively high-speed process can be performed isdynamically determined on the basis of the feature information. Thereis, consequently, an effect such that the relatively high-speed printingprocess can be always realized without depending on the size of RAMprovided in the printer.

A characteristic construction of the embodiment will now be describedhereinbelow with reference to FIG. 8 and the like.

The embodiment relates to a data processing method of a data processingapparatus which is constructed as mentioned above and can communicatewith a printer through a predetermined communication medium or relatesto a memory medium in which a computer readable program for controllinga data processing apparatus which can communicate with a printer througha predetermined communication medium has been stored, wherein the dataprocessing method or the program comprises: a printer command formingstep (step (10) in FIG. 8) of constructing a print image by analyzing adrawing command which is formed by an operating system and forming aprinter control command which is based on the print image and should betransferred to the printer; an obtaining step (step (5) in FIG. 8) ofobtaining feature information to presume print processing times by theprinter command forming step in the case where a specific compressionmethod is used and the case where it is not used; a discriminating step(step (4) in FIG. 6) of discriminating whether the specific compressionmethod should be used in the printer command forming step or not on thebasis of the feature information obtained by the obtaining step; and adeciding step (step (10) in FIG. 8) of deciding the formation of theprinter control command to which the specific compression method whichis formed by the printer command forming step is applied and theformation of the printer control command to which the specificcompression method is not applied on the basis of a discriminationresult of the discriminating step. Therefore, whether the compressionmethod is applied to the print data amount which fluctuates or not canbe dynamically determined in consideration of the feature information topresume the print processing time by the printer command forming step.For the print data such that the processing time which is presumed isbelow the effect which is obtained by the compression, the printercontrol command which is based on the print image and should betransferred to the printer is formed without actively compressing. Aseries of printing processes can be remarkably reduced.

A construction of data processing programs which can be read out by aprinting system to which the print control apparatus according to theinvention can be applied will now be described hereinbelow withreference to a memory map shown in FIG. 9.

FIG. 9 is a diagram for explaining the memory map of a memory medium tostore various data processing programs which can be read out by theprinting system to which the print control apparatus according to theinvention can be applied.

Although not particularly shown, there is also a case where informationto manage the programs which are stored in the memory medium, forexample, version information, names of the persons who made theprograms, and the like are also stored, and information depending on theOS or the like on the program reading side, for example, icons toidentify and display the programs and the like are also stored.

Further, data depending on the various programs is also managed in theabove directory. There is also a case where a program to install thevarious programs into the computer, a program to decompress a program inthe case where the program to install has been compressed, and the likeare also stored.

The functions shown in FIGS. 4, 5, 6, and 8 in the embodiments can bealso executed by the host computer on the basis of a program which isinstalled from the outside. In such a case, the invention is alsoapplied to a case where an information group including the programs aresupplied to an output apparatus by a memory medium such as CD-ROM, flashmemory, FD, or the like or from an external memory medium through anetwork.

It will be obviously understood that the object of the invention isaccomplished by a construction such that a memory medium in whichprogram codes of software to realize the functions of the foregoingembodiments as mentioned above have been recorded is supplied to asystem or an apparatus and a computer (or CPU or MPU) of the system orapparatus reads out and executes the program codes stored in the memorymedium.

In this case, the program codes themselves read out from the memorymedium realize the novel function of the invention and the memory mediumin which the program codes have been stored constructs the invention.

As a memory medium to supply the program codes, for example, any one ofa floppy disk, a hard disk, an optical disk, a magnetooptic disk, aCD-ROM, a CD-R, a magnetic tape, a non-volatile memory card, an ROM, anEEPROM, and the like can be used.

It will be obviously understood that the invention incorporates not onlya case where the functions of the foregoing embodiments are realized byexecuting the read-out program codes by the computer but also a casewhere the OS (operating system) or the like which is operating on thecomputer executes a part or all of the actual processes on the basis ofinstructions of the program codes and the functions of the foregoingembodiments are realized by those processes.

Further, it will be obviously understood that the invention alsoincorporates a case where the program codes read out from the memorymedium are written into a memory provided for a function expanding boardinserted to a computer or a function expanding unit connected to thecomputer and, after that, a CPU or the like provided for the functionexpanding board or function expanding unit executes a part or all of theactual processes on the basis of instructions of the program codes, andthe functions of the foregoing embodiments are realized by theprocesses.

As described above, according to the first aspect of the invention,there is provided a data processing apparatus which can communicate witha printer through a predetermined communication medium, comprising:printer command forming means for constructing a print image byanalyzing a drawing command which is formed by an operating system andfor forming a printer control command which is based on the print imageand should be transferred to the printer; first obtaining means forobtaining feature information to presume print processing times by theprinter command forming means in the case where a specific compressionmethod is used and the case where it is not used; discriminating meansfor discriminating whether the printer command forming means should usethe specific compression method or not on the basis of the featureinformation obtained by the first obtaining means; and control means forswitching and controlling the formation of the printer control commandto which the specific compression method which is formed by the printercommand forming means is applied and the formation of the printercontrol command to which the specific compression method is not appliedon the basis of a discrimination result of the discriminating means.Therefore, whether the compression method is applied to the print dataamount which fluctuates or not can be dynamically determined inconsideration of the feature information to presume the print processingtime by the printer command forming means. For the print data such thatthe processing time that is predicted is below the effect which isobtained by the compression, the printer control command which is basedon the print image and should be transferred to the printer is formedwithout actively compressing, and a series of printing processes can beremarkably reduced.

According to the second aspect of the invention, the discriminatingmeans compares the processing times which are computed from the featureinformation obtained by the first obtaining means and from apredetermined parameter, thereby discriminating whether the printercommand forming means can apply the use of the specific compressionmethod or not. Therefore, the print processing times in the case wherethe compression method is applied and the case where it is not appliedare computed and relatively compared and verified, so that whether theuse of the specific compression method can be applied or not can becertainly determined.

According to the third aspect of the invention, the discriminating meansdiscriminates whether the specific compression method should be usedafter the print image was constructed or not. Therefore, the time thatis required from a time point after whether the compression method isapplied or not was determined to a time point when the printer controlcommand is formed and transferred can be remarkably reduced.

According to the fourth aspect of the invention, the first obtainingmeans obtains the feature information to presume the print processingtime from a predetermined memory medium. Therefore, the featureinformation that is peculiar to the specific compression method can becertainly obtained.

According to the fifth aspect of the invention, the predetermined memorymedium is a memory medium which is detachable to/from a main body of thedata processing apparatus. Therefore, even when the printer is changedor a plurality of printers can be selected, the feature information thatis peculiar to the corresponding specific compression method can becertainly obtained.

According to the sixth aspect of the invention, the first obtainingmeans obtains the feature information to presume the print processingtime from a value that is inputted on a predetermined print settingpicture plane depending on a print control module. Therefore, thefeature information can be also usually set through a graphical userinterface such as a printer driver setting picture plane or the like bythe user.

According to the seventh aspect of the invention, the first obtainingmeans obtains the feature information to presume the print processingtime by a predetermined program module. Therefore, an environment toperform the obtaining process of the feature information can be preparedindependently of the printer control.

According to the eighth aspect of the invention, the first obtainingmeans obtains the feature information to presume the print processingtime from a memory resource of the printer through the communicationmedium. Therefore, the feature information that is peculiar to thespecific compression method can be obtained from the printer and aburden on the memory can be reduced.

According to the ninth aspect of the invention, the first obtainingmeans obtains the feature information to presume the print processingtime from a memory resource which is detachable to/from the printerthrough the communication medium. Therefore, the feature informationthat is peculiar to the specific compression method can be obtained fromthe memory resource that is supplied to the printer and a burden on thememory can be reduced.

According to the tenth aspect of the invention, the data processingapparatus further has: second obtaining means for obtaining printresource information from the printer through the communication medium;and changing means for changing the feature information to presume theprint processing time obtained by the first obtaining means on the basisof the print resource information obtained by the second obtainingmeans. Therefore, in the case where the resource environment on theprinter side fluctuates and the print processing time fluctuates, thefeature information that is peculiar to the specific compression methodcan be changed also in consideration of such a fluctuation. The use ofthe compression method can be determined flexibly also in correspondenceto the fluctuation of the resource information on the printer side.

According to the eleventh and twelfth aspects of the invention, there isprovided a data processing method of a data processing apparatus whichis constructed as mentioned above and can communicate with a printerthrough a predetermined communication medium or a memory medium in whicha computer readable program for controlling a data processing apparatuswhich can communicate with a printer through a predeterminedcommunication medium has been stored, wherein the data processing methodor the program comprises: a printer command forming step of constructinga print image by analyzing a drawing command which is formed by anoperating system and forming a printer control command which is based onthe print image and should be transferred to the printer; an obtainingstep of obtaining feature information to presume print processing timesby the printer command forming step in the case where a specificcompression method is used and the case where it is not used; adiscriminating step of discriminating whether the specific compressionmethod should be used in the printer command forming step or not on thebasis of the feature information obtained by the obtaining step; and adeciding step of deciding the formation of the printer control commandto which the specific compression method which is formed by the printercommand forming step is applied and the formation of the printer controlcommand to which the specific compression method is not applied on thebasis of a discrimination result of the discriminating step. Therefore,whether the compression method is applied to the print data amount whichfluctuates or not can be dynamically determined in consideration of thefeature information to presume the print processing time by the printercommand forming step. For the print data such that the processing timewhich is presumed is below the effect which is obtained by thecompression, the printer control command which is based on the printimage and should be transferred to the printer is formed withoutactively compressing. A series of printing processes can be remarkablyreduced.

Therefore, the feature information which enables the various printprocessing times in the case where the specific compression method isapplied and the case where it is not applied to be presumed is obtained.The printer control commands can be sequentially formed while thecompression method by which the relatively high-speed process can beperformed is dynamically determined on the basis of the featureinformation. Effects such that the relatively high-speed printingprocess can be realized and the like are obtained.

1. A data processing apparatus which can execute image processing inunits of a predetermined segment and can communicate with a printerthrough a predetermined communication medium, said apparatus comprising:print command forming means for producing a print image by analyzing adrawing command and forming, based on the print image, a print controlcommand to be transmitted to the printer; compression means forcompressing image data in a predetermined segment into compressed databy applying a specific compression method so as to obtain a size of thecompressed data; recognition means for recognizing a print start requestprovided by an application; determination means for determining athreshold value in response to recognition of the print start request bysaid recognition means; discrimination means for making a discriminationthat the specific compression method is to be applied to the image datain the predetermined segment if the data size obtained by saidcompression means is smaller than the threshold value determined by saiddetermination means based on a communication rate between said dataprocessing apparatus and the printer; and control means for controllingsaid print command forming means to form the print control command thatis related to the specific compression method if said discriminationmeans makes the discrimination that the specific compression method isto be applied to the image data in the predetermined segment.
 2. Anapparatus according to claim 1, wherein the predetermined thresholdvalue is determined based on the communication rate between said dataprocessing apparatus and the printer and also based on informationindicating a memory capacity of the printer.
 3. An apparatus accordingto claim 2, wherein the information indicating the memory capacity ofthe printer is obtained by a printer driver provided in said dataprocessing apparatus through a network.
 4. An apparatus according toclaim 1, wherein the predetermined threshold value is determined basedon a data read process from or a data write process into a memoryprovided in said data processing apparatus.
 5. A method for execution ina data processing apparatus which can execute image processing in unitsof a predetermined segment and can communicate with a printer through apredetermined communication medium, said method comprising: producing aprint image by analyzing a drawing command and forming, based on theprint image, a print control command to be transmitted to the printer;compressing image data in a predetermined segment into compressed databy applying a specific compression method so as to obtain a size of thecompressed data; recognizing a print start request provided by anapplication; determining a threshold value in response to recognition ofthe print start request in said recognizing step; discriminating thatthe specific compression method is to be applied to the image data inthe predetermined segment if the data size obtained in said compressingstep is smaller than the threshold value determined in said determiningstep based on a communication rate to and from the printer; andcontrolling said producing step to form the print control command thatis related to the specific compression method if said discriminatingstep makes the discrimination that the specific compression method is tobe applied to the image data in the predetermined segment.
 6. A methodaccording to claim 5, wherein the predetermined threshold value isdetermined based on the communication rate between said data processingapparatus and the printer and also based on information indicating amemory capacity of the printer.
 7. A method according to claim 6,wherein the information indicating the memory capacity of the printer isobtained by a printer driver through a network.
 8. A method according toclaim 5, wherein the predetermined threshold value is determined basedon a data read process from or a data write process into a memory. 9.Computer-executable program code stored on a computer-readable medium,said computer-executable program code executable by a data processingapparatus to execute image processing in units of a predeterminedsegment and to communicate with a printer through a predeterminedcommunication medium, said computer-executable program code comprising:code to produce a print image by analyzing a drawing command andforming, based on the print image, a print control command to betransmitted to the printer; code to compress image data in apredetermined segment into compressed data by applying a specificcompression method so as to obtain a size of the compressed data; codeto recognize a print start request provided by an application; code todetermine a threshold value in response to recognition of the printstart request by said recognition code; code to discriminate that thespecific compression method is to be applied to the image data in thepredetermined segment if the data size obtained by said compression codeis smaller than the threshold value determined by said determinationcode based on a communication rate between said data processingapparatus and the printer; and code to control print command formingmeans to form the print control command that is related to the specificcompression method if said discrimination code makes the discriminationthat the specific compression method is to be applied to the image datain the predetermined segment.
 10. Computer-executable program codeaccording to claim 9, wherein the predetermined threshold value isdetermined based on a communication rate between said data processingapparatus and the printer and also based on information indicating amemory capacity of the printer.
 11. Computer-executable program codeaccording to claim 10, wherein the information indicating the memorycapacity of the printer is obtained by a printer driver provided in saiddata processing apparatus through a network.
 12. Computer-executableprogram code according to claim 9, wherein the predetermined thresholdvalue is determined based on a data read process from or a data writeprocess into a memory provided in said data processing apparatus.
 13. Acomputer-readable medium which stores computer-executable process stepsfor execution in a data processing apparatus for executing imageprocessing in units of a predetermined segment and communicating with aprinter through a predetermined communication medium, said computerexecutable process steps comprising: producing step to produce a printimage by analyzing a drawing command and forming, based on the printimage, a print control command to be transmitted to the printer;compressing step to compress image data in a predetermined segment intocompressed data by applying a specific compression method so as toobtain a size of the compressed data; recognizing step for recognizing aprint start request provided by an application; determining step fordetermining a threshold value in response to recognition of the printstart request in said recognizing step; discriminating step todiscriminate that the specific compression method is to be applied tothe image data in the predetermined segment if the data size obtained insaid compressing step is smaller than the threshold value determined insaid determining step based on a communication rate to and from theprinter; and controlling step to control said producing step to form theprint control command that is related to the specific compression methodif said discriminating step makes the discrimination that the specificcompression method is to be applied to the image data in thepredetermined segment.
 14. A computer-readable medium according to claim13, wherein the predetermined threshold value is determined based on thecommunication rate between said data processing apparatus and theprinter and also based on information indicating a memory capacity ofthe printer.
 15. A computer-readable medium according to claim 14,wherein the information indicating the memory capacity of the printer isobtained by a printer driver provided in said data processing apparatusthrough a network.
 16. A computer-readable medium according to claim 13,wherein the predetermined threshold value is determined based on a dataread process from or a data write process into a memory provided in saiddata processing apparatus.